// Update Confirm registration
function updateConfirmation(){
var user_id=getParameterByName('id');
	if(user_id!=""){
		$.ajax({
			type		:	'PUT',
			url			:  	webServiceUrl+'registration/'+user_id,
			dataType	: 	"json",
			data		:	{status:'1'},
			success: function(data){
				if(data.value==1){
					localStorage.setItem( 'user_id', JSON.stringify(user_id));	
				}
			}
		});
	}
}
function submitCourseFunction(type){
	var flagg=true;
	//var type=getParameterByName('id');
	var technology=$("#technology").val();
	var experience=$("#year_of_exp").val();
	if(technology==""){
		$("#technologyError").html('Required');
		return false;
	}else{
		$("#technologyError").html('');
	}
	if(experience==""){
		$("#year_of_expError").html('Required');
		return false;
	}else{
		$("#year_of_expError").html('');
	}
	if(flagg==true){
	$('#CourseLoader').html('<img src="images/ajax-loader.gif"/>');
		$.ajax({
			type		:	'PUT',
			url			:  	webServiceUrl+'addcourses/'+technology,
			dataType	: 	"json",
			data		:	{year_of_experience:experience},
			success: function(data){
			$('#CourseLoader').html('');
				if(data.value==1){	
					if(type==0){
						window.location="subjects.html?id="+technology;
					}else if(type==1){
						window.location="levels.html?id="+technology+'-'+'0';
					}else{
						window.location="jobdetailes.html";
					}
				}
			}
		});
	}
}
//get Technology
function getTechnology(){
		$.ajax({
		type		:	'GET',
		url			:  	webServiceUrl+'addtechnology/'+'0',
		dataType	: 	"json",
		success: function(data){
			var viewTechnology="";
			if(data.value==1){
			var obj = eval("(" + data.editCourse + ")");
			viewTechnology+='<option value=""> Choose Course </option>';
				$.each(obj, function (index,Object) {
						/*viewTechnology+='<p>'+count+' . <a href="javascript:void(0)" onclick="technologyInfoFunction('+Object.technology_id+')">'+Object.technology_name+'</a></p>';*/
						viewTechnology+='<option value="'+Object.technology_id+'">'+Object.technology_name+'</option>';
				});	
				$('#technology_list').html(viewTechnology);
			}
		}
	});
}

//END

//get course
function getCourse(){
$.ajax({
		type		:	'GET',
		url			:  	webServiceUrl+'addcourses/'+'0',
		dataType	: 	"json",
		success: function(data){
			var viewCourse="";
			if(data.value==1){
			var obj = eval("(" + data.editCourse + ")");
				viewCourse+='<option value="">Choose Technology</option>';
				$.each(obj, function (index,Object) {
						if((Object.course_id)!=null){
							if(i==Object.course_id){
								viewCourse+='<option value="'+Object.course_id+'" selected=selected>'+Object.course_name+'</option>';
							}else{
								viewCourse+='<option value="'+Object.course_id+'">'+Object.course_name+'</option>';
							}
							$('#technology').html(viewCourse);
						}
						if((Object.year_of_experience)!=null){
							var options="";
							options+='<option value="">Choose Exp.</option>';
							for(var i=1;i<=1;i++){
								if(i==Object.yesr_of_experience){
									options+='<option value="'+i+'" selected=selected>0'+i+'</option>';
								}else{
									options+='<option value="'+i+'" >0'+i+'</option>';
								}
							}
							$('#year_of_exp').html(options);
						}
				});	
			}
		}
	});
}
//redirect about course html

function technologyInfoFunction(tech_id){
	window.location="aboutcourse.html?id="+tech_id;
}
//getSubjects 
function getSubjects(){
var courseId=getParameterByName('id');
	$.ajax({
		type		:	'GET',
		url			:  	webServiceUrl+'addsubjects/'+courseId+'-'+'0'+'-'+'0',
		dataType	: 	"json",
		success: function(data){
			var viewSubjects="";
			if(data.value==1){
			var obj = eval("(" + data.Subjectlist + ")");
				$.each(obj, function (index,Object) {
					$('#replacetext').html(Object.course_name +'- Select Technology');
					viewSubjects+='<h4><a href="javascript:void(0)" onclick="getlevelsFunction('+Object.course_id+','+Object.subject_id+')">'+Object.subject_name+'</a></h4>';
				});	
				$('#subject_list').html(viewSubjects);
			}
		}
	});
}

//end
// levels html
function getlevelsFunction(course_id,subject_id){
	window.location="levels.html?id="+course_id+'-'+subject_id;
}

//get levels
function getLevels(){
var user_id= JSON.parse(localStorage["user_id"]);
var Ids  = getParameterByName('id');
var splitIds =Ids.split('-');
if(splitIds[1]==0){
	$('.color2').addClass('active');
	$('.color3').removeClass('active');
}else{
	$('.color3').addClass('active');
	$('.color2').removeClass('active');
}
	$.ajax({
		type		:	'GET',
		url			:  	webServiceUrl+'getlevels/'+splitIds[0]+'-'+splitIds[1]+'-'+user_id,
		dataType	: 	"json",
		success: function(data){
			var viewLevel="";
			var activeClass="";
			var i=1;
			if(data.value==1){
			
			if(data.getLevel==0){
				var level=1;
			}else{
				var level=parseInt(data.getLevel) + 1;
			}
			var obj = eval("(" + data.levelList + ")");
				$.each(obj, function (index,Object) {
					if(i==level){
						viewLevel+='<li><h1>'+
								'<a href="javascript:void(0)" onclick="getQuestionsFunction('+Object.course_id+','+Object.subject_id+','+level+')">0'+Object.level+'</a> </h1></li>';
					}else{
						viewLevel+='<li class="deactive" ><h1>'+
								'<a href="javascript:void(0)" >0'+Object.level+'</a> </h1></li>';
					}
					i++;
				});	
				$('#level_list').html(viewLevel);
			}
		}
	});
}

//question html
function getQuestionsFunction(course_id,subject_id,level){
window.location="questions.html?id="+course_id+'-'+subject_id+'-'+level;
}

function getParameterByName(name) {
    name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]");
    var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"),
        results = regex.exec(location.search);
    return results == null ? "" : decodeURIComponent(results[1].replace(/\+/g, " "));
}
var QuestionsArray= new Array();
function questionsList(que_id,sub_id,cou_id,question_id){
	var user_id = JSON.parse(localStorage["user_id"]);
	var course_id=getParameterByName('id');
	var splitcourse_id=course_id.split('-');
	var value=$('#hid_value').val();
	if(splitcourse_id[1]==0){
		$('.color2').addClass('active');
		$('.color3').removeClass('active');
	}else{
		$('.color3').addClass('active');
		$('.color2').removeClass('active');
	}
	$('#level').html('Level - 0'+splitcourse_id[2]);
	var viewquestions="";
	var  achecked="";
	var  bchecked="";
	var  cchecked="";
	var  dchecked="";
if(value==0){
	$.ajax({
		type		:	'GET',
		url			:  	webServiceUrl+'addquestions/'+splitcourse_id[0]+'-'+value+'-'+user_id+'-'+splitcourse_id[2]+'-'+splitcourse_id[1]+'-'+que_id+'-'+sub_id+'-'+cou_id+'-'+question_id,
		dataType	: 	"json",
		success: function(data){
			if(data.value==1){
				var obj = eval("(" + data.questionsList + ")");
				$.each(obj, function (index,Object) {
					QuestionsArray.push(Object.question_id);
				});
				localStorage["question_list"] = JSON.stringify(QuestionsArray);
			}
			var question_list= JSON.parse(localStorage["question_list"]);
			$.ajax({
				type		:	'GET',
				url			:  	webServiceUrl+'addquestions/'+splitcourse_id[0]+'-'+question_list[value]+'-'+user_id+'-'+splitcourse_id[2]+'-'+splitcourse_id[1]+'-'+que_id+'-'+sub_id+'-'+cou_id+'-'+1,
				dataType	: 	"json",
				success: function(data){
					if(data.value==1){
						var obj = eval("(" + data.questionsList + ")");
							$.each(obj, function (index,Object) {
								var answer=Object.user_answer;	
							$('#question_name').html(Object.question_name);
							if(answer=='A'){
								 achecked='checked';
							}else if(answer=='B'){
								 bchecked='checked';
							}else if(answer=='C'){
								 cchecked='checked';
							}else if(answer=='D'){
								 dchecked='checked';
							}
					if(Object.option1!="" && Object.option1!=null){
						viewquestions+='<div class="funkyradio-primary">'+
						'<input type="radio" id="option1'+Object.question_id+'" name="option'+Object.question_id+'" value="A" '+achecked+' />'+
						'<label for="option1'+Object.question_id+'">'+Object.option1+'</label>'+
						'</div>';
					}
					if(Object.option2!="" && Object.option2!=null){
						viewquestions+='<div class="funkyradio-primary">'+
						'<input type="radio" id="option2'+Object.question_id+'" name="option'+Object.question_id+'" value="B" '+bchecked+' />'+
						'<label for="option2'+Object.question_id+'">'+Object.option2+'</label>'+
						'</div><br/>';
					}
					if(Object.option3!="" && Object.option3!=null){
						viewquestions+='<div class="funkyradio-primary">'+
						'<input type="radio" id="option3'+Object.question_id+'" name="option'+Object.question_id+'" value="C" '+cchecked+' />'+
						'<label for="option3'+Object.question_id+'">'+Object.option3+'</label>'+
						'</div><br/>';
					}
					if(Object.option4!="" && Object.option4!=null){
						viewquestions+='<div class="funkyradio-primary">'+
						'<input type="radio" id="option4'+Object.question_id+'" name="option'+Object.question_id+'" value="D" '+dchecked+' />'+
						'<label for="option4'+Object.question_id+'">'+Object.option4+'</label>'+
						'</div><br/>';
					}
					if(value==0){
						viewquestions+='<button type="button" onclick="nextQuestion('+Object.question_id+','+Object.course_id+',0,'+Object.subject_id+',0,0,0)" class="btn btn-primary btn-outline btn-sm pull-right">Next</button>';
						viewquestions+='&nbsp;<button type="button" onclick="endgameFunction('+Object.question_id+','+splitcourse_id[2]+','+Object.course_id+','+Object.subject_id+')"  class="btn btn-warning btn-outline btn-sm">End Game</button>';
					}
				});	
				
				viewquestions+='&nbsp;<button type="button" onclick="logoutFunction()" class="btn btn-danger btn-outline btn-sm">Logout</button>';
				$('#question_list').html(viewquestions);
			}else{
				$('#level').html('');
				$('#Completed_levelError').html("No Questions Found.");
			}
		}
		});
	}
	});
}else{
	var question_list= JSON.parse(localStorage["question_list"]);
		$.ajax({
				type		:	'GET',
				url			:  	webServiceUrl+'addquestions/'+splitcourse_id[0]+'-'+question_list[value]+'-'+user_id+'-'+splitcourse_id[2]+'-'+splitcourse_id[1]+'-'+que_id+'-'+sub_id+'-'+cou_id+'-'+1,
				dataType	: 	"json",
				success: function(data){
					if(data.value==1){
						var obj = eval("(" + data.questionsList + ")");
							$.each(obj, function (index,Object) {
								var answer=Object.user_answer;	
							$('#question_name').html(Object.question_name);
							if(answer=='A'){
								 achecked='checked';
							}else if(answer=='B'){
								 bchecked='checked';
							}else if(answer=='C'){
								 cchecked='checked';
							}else if(answer=='D'){
								 dchecked='checked';
							}
					if(Object.option1!="" && Object.option1!=null){
						viewquestions+='<div class="funkyradio-primary">'+
						'<input type="radio" id="option1'+Object.question_id+'" name="option'+Object.question_id+'" value="A" '+achecked+' />'+
						'<label for="option1'+Object.question_id+'">'+Object.option1+'</label>'+
						'</div>';
					}
					if(Object.option2!="" && Object.option2!=null){
						viewquestions+='<div class="funkyradio-primary">'+
						'<input type="radio" id="option2'+Object.question_id+'" name="option'+Object.question_id+'" value="B" '+bchecked+' />'+
						'<label for="option2'+Object.question_id+'">'+Object.option2+'</label>'+
						'</div><br/>';
					}
					if(Object.option3!="" && Object.option3!=null){
						viewquestions+='<div class="funkyradio-primary">'+
						'<input type="radio" id="option3'+Object.question_id+'" name="option'+Object.question_id+'" value="C" '+cchecked+' />'+
						'<label for="option3'+Object.question_id+'">'+Object.option3+'</label>'+
						'</div><br/>';
					}
					if(Object.option4!="" && Object.option4!=null){
						viewquestions+='<div class="funkyradio-primary">'+
						'<input type="radio" id="option4'+Object.question_id+'" name="option'+Object.question_id+'" value="D" '+dchecked+' />'+
						'<label for="option4'+Object.question_id+'">'+Object.option4+'</label>'+
						'</div><br/>';
					}
					
						viewquestions+='<button type="button" onclick="previousQuestion('+Object.question_id+','+Object.course_id+','+splitcourse_id[2]+','+Object.subject_id+')"  class="btn btn-primary btn-outline btn-sm">Prev</button>';
							if(value<9){
								viewquestions+='<button type="button" onclick="nextQuestion('+Object.question_id+','+Object.course_id+',0,'+Object.subject_id+',0,0,0)" class="btn btn-primary btn-outline btn-sm pull-right">Next</button>';
							}else{
								viewquestions+='<button type="button" onclick="submitFunction('+Object.question_id+','+Object.course_id+','+splitcourse_id[2]+','+Object.subject_id+')" class="btn btn-primary btn-outline btn-sm pull-right">Submit</button>';
							}
						viewquestions+='&nbsp;<button type="button" onclick="submitFunction('+Object.question_id+','+Object.course_id+','+splitcourse_id[2]+','+Object.subject_id+')" class="btn btn-warning btn-outline btn-sm">End Game</button>';
				});	
				
				viewquestions+='&nbsp;<button type="button" onclick="logoutFunction()" class="btn btn-danger btn-outline btn-sm">Logout</button>';
				$('#question_list').html(viewquestions);
			}else{
				$('#level').html('');
				$('#Completed_levelError').html("No Questions Found.");
			}
		}
		});


}	
}

function endgameFunction(question_id,level,course_id,subject_id){
	window.location="menu.html";
}

function nextQuestion(question_id,course_id,type,subject_id,que_id,sub_id,cou_id){
var flag=true;
var question_list= JSON.parse(localStorage["question_list"]);
var hid_value=$('#hid_value').val();
var hValue= parseInt(hid_value) + 1;
var user_id = JSON.parse(localStorage["user_id"]);
var level=$('#hid_level').val();
var user_answer= $('input[name=option'+question_id+']:checked').val();
if(typeof $('input[name=option'+question_id+']:checked').val()=="undefined"){
		var answer='No Answer';
	}else{
		answer=user_answer;
	}
	if(flag==true){
		$('#question_loader').html('<img src="images/ajax-loader.gif" />');
		$.ajax({
			type		:	'POST',
			url			:  	webServiceUrl+'addresults',
			dataType	: 	"json",
			data		:	{user_id:user_id,course_id:course_id,question_id:question_id,user_answer:answer,type:type,subject_id:subject_id,que_id:que_id,sub_id:sub_id,cou_id:cou_id},
			success: function(data){
				$('#question_loader').html('');
				if(data.value==1){
					$('#hid_value').val(hValue);
					questionsList(0,0,0,question_id);
				}else{
					$('#hid_value').val(hValue);
					questionsList(que_id,sub_id,cou_id,question_id);
				}
			}
		});
	}
}
//Update answer 

function updateAnswerFunction(answer,q_id,c_id,sub_id,u_id){
	$.ajax({
		type		:	'PUT',
		url			:  	webServiceUrl+'addtechnology/'+answer,
		dataType	: 	"json",
		data		:	{user_answer:answer,course_id:c_id,subject_id:sub_id,question_id:q_id,user_id:u_id},
		success: function(data){
			
		}	
	});
}
function previousQuestion(question_id,course_id,level,subject_id){
var user_id=JSON.parse(localStorage["user_id"]);
var question_list= JSON.parse(localStorage["question_list"]);
var question_answer= $('input[name=option'+question_id+']:checked').val();
var q_id=question_id;
var c_id=course_id;
var s_id=subject_id;
if(typeof $('input[name=option'+question_id+']:checked').val()!="undefined"){
	updateAnswerFunction(question_answer,question_id,course_id,subject_id,user_id);
}
	var Hvalue=$('#hid_value').val();
	var hidValue=parseInt(Hvalue) - 1;
	$('#question_loader').html('<img src="images/ajax-loader.gif" />');
	$.ajax({
			type		:	'GET',
			url			:  	webServiceUrl+'addresults/'+course_id+'-'+question_list[hidValue]+'-'+user_id+'-'+level+'-'+subject_id+'-'+0,
			dataType	: 	"json",
			success: function(data){
				if(data.value==1){
					var prequestions="";
					var  achecked="";
					var  bchecked="";
					var  cchecked="";
					var  dchecked="";
					if(data.value==1){
					$('#question_loader').html('');
					var obj = eval("(" + data.getdata + ")");
						$.each(obj, function (index,Object) {
							$('#question_name').html(Object.question_name);
							var answer=Object.user_answer;	
								if(answer=='A'){
									 achecked='checked';
								}else if(answer=='B'){
									 bchecked='checked';
								}else if(answer=='C'){
									 cchecked='checked';
								}else if(answer=='D'){
									 dchecked='checked';
								}
								if(Object.option1!="" && Object.option1!=null){
									prequestions+='<div class="funkyradio-primary">'+
									'<input type="radio" id="option1'+Object.question_id+'" name="option'+Object.question_id+'" value="A" '+achecked+' />'+
									'<label for="option1'+Object.question_id+'">'+Object.option1+'</label>'+
									'</div><br/>';
								}
								if(Object.option2!="" && Object.option2!=null){
									prequestions+='<div class="funkyradio-primary">'+
									'<input type="radio" id="option2'+Object.question_id+'" name="option'+Object.question_id+'" value="B" '+bchecked+' />'+
									'<label for="option2'+Object.question_id+'">'+Object.option2+'</label>'+
									'</div><br/>';
								}
								if(Object.option3!="" && Object.option3!=null){
								prequestions+='<div class="funkyradio-primary">'+
								'<input type="radio" id="option3'+Object.question_id+'" name="option'+Object.question_id+'" value="C" '+cchecked+' />'+
								'<label for="option3'+Object.question_id+'">'+Object.option3+'</label>'+
								'</div></br>';
								}
								if(Object.option4!="" && Object.option4!=null){
								prequestions+='<div class="funkyradio-primary">'+
								'<input type="radio" id="option4'+Object.question_id+'" name="option'+Object.question_id+'" value="D" '+dchecked+' />'+
								'<label for="option4'+Object.question_id+'">'+Object.option4+'</label>'+
								'</div><br/>';
								}
								if(hidValue==0){
									prequestions+='<button type="button" onclick="nextQuestion('+Object.question_id+','+Object.course_id+',1,'+Object.subject_id+','+q_id+','+c_id+','+s_id+')" class="btn btn-primary btn-outline btn-sm pull-right">Next</button>'+
										'<button type="button" onclick="endgameFunction('+Object.question_id+')" class="btn btn-warning btn-outline btn-sm">End Game</button>';
								}else{
									prequestions+='<button type="button" onclick="previousQuestion('+Object.question_id+','+Object.course_id+','+level+','+Object.subject_id+')" class="btn btn-primary btn-outline btn-sm">Prev</button>';
									if(hidValue<9){
										prequestions+='<button type="button" onclick="nextQuestion('+Object.question_id+','+Object.course_id+',1,'+Object.subject_id+','+q_id+','+c_id+','+s_id+')"   class="btn btn-primary btn-outline btn-sm pull-right">Next</button>';
									}else{
										prequestions+='<button type="button" onclick="submitFunction('+Object.question_id+','+Object.course_id+','+level+','+Object.subject_id+')" class="btn btn-primary btn-outline btn-sm pull-right">Submit</button>';
									}
									prequestions+='&nbsp;<button type="button" onclick="submitFunction('+Object.question_id+','+Object.course_id+','+level+','+Object.subject_id+')" class="btn btn-warning btn-outline btn-sm">End Game</button>';
								}
						});	
						prequestions+='&nbsp;<button type="button" onclick="logoutFunction()" class="btn btn-danger btn-outline btn-sm">Logout</button>	';
						$('#hid_value').val(hidValue);
						$('#question_list').html(prequestions);
					}
				}
			}
		});
}

function submitFunction(question_id,course_id,level,subject_id){
var user_id = JSON.parse(localStorage["user_id"]);
var user_answer= $('input[name=option'+question_id+']:checked').val();
if(typeof $('input[name=option'+question_id+']:checked').val()=="undefined"){
		var answer='No Answer';
	}else{
		answer=user_answer;
	}
$.ajax({
		type		:	'PUT',
		url			:  	webServiceUrl+'addresults/'+question_id,
		dataType	: 	"json",
		data		:	{user_id:user_id,course_id:course_id,user_answer:answer,level:level,subject_id:subject_id},
		success: function(data){
			if(data.value==1){
				window.location="results.html?id="+data.checktotalResults+'-'+course_id+'-'+level+'-'+subject_id;
			}
		}
	});
}
function getTotalResults(){
var user_id = JSON.parse(localStorage["user_id"]);
var totalCount = getParameterByName('id');
var SplittotalCount=totalCount.split('-');
if(SplittotalCount[3]==0){
	$('.color2').addClass('active');
	$('.color3').removeClass('active');
}else{
	$('.color3').addClass('active');
	$('.color2').removeClass('active');
}
var nextlevel= parseInt(SplittotalCount[2]) + 1;
var results="";
var level="";
var score="";
	if(SplittotalCount[0]<9){
		
		results+='<h3>Need to play again, to go to Next Level</h3><br>'+

        '<button type="button" onclick="playAgain('+SplittotalCount[2]+','+SplittotalCount[3]+')" class="btn btn-primary btn-outline btn-lg">Play Again</button><br><br>'+
        
        '<button type="button" onclick="logoutFunction()" class="btn btn-danger btn-outline btn-sm pull-right">Logout</button>'+
        
        '<button type="button" onclick="GameEndFunction()" class="btn btn-warning btn-outline btn-sm">End Game</button>';
		level+='Level - 0'+SplittotalCount[2]+'';
		score+='<h2 class="blueText" >Your Score '+SplittotalCount[0]+'</h2>';
		$('#level').html(level);
		$('#score').html(score);
		$('#total_results').html(results);
	}else{
		results+='<h1 class="sucessText">Congratualations !</h1>'+
        '<h3>You have Successfully Completed Level - '+SplittotalCount[2]+' </h3>'+
        '<br>'+
        '<br>'+
		'<h4>Click here to go to next level</h4><br>'+
       '<button type="button" onclick="playNext('+nextlevel+','+SplittotalCount[3]+')" class="btn btn-success btn-outline btn-lg">Next 		Level</button><br><br>'+
       '<button type="button" onclick="logoutFunction()" class="btn btn-danger btn-outline btn-sm 	pull-right">Logout</button>'+
        '<button type="button" onclick="GameEndFunction()" class="btn btn-warning btn-outline btn-sm">End Game</button>';
		level+='Level - 0'+SplittotalCount[2]+'';
		score+='<h2 class="sucessText" >Your Score '+SplittotalCount[0]+'</h2>';
		$.ajax({
		type		:	'POST',
		url			:  	webServiceUrl+'levelcompleted',
		dataType	: 	"json",
		data		:	{user_id:user_id,level:SplittotalCount[2],subject_id:SplittotalCount[3],course_id:SplittotalCount[1]},
			success: function(data){
				if(data.value==1){
					$('#level').html(level);
					$('#score').html(score);
					$('#total_results').html(results);
				}
			}
		});
	}
	$('#hid_c_id').val(SplittotalCount[1]);
}

function playAgain(level,subject_id){
	var courseId=$('#hid_c_id').val();
	window.location="questions.html?id="+courseId+'-'+subject_id+'-'+level
}
function playNext(level,subject_id){
	var courseId=$('#hid_c_id').val();
	window.location="questions.html?id="+courseId+'-'+subject_id+'-'+level
}

function GameEndFunction(){
	window.location="menu.html";
}

//Get Course information

function ChangeCourseDetailes(){
	var flag=true;
	var courseValue=$('#technology_list').val();
	$('#technologyError').html('');
	if(courseValue==""){
		$('#tecloader').html('');
		$('#displayContent').html('');
		//$('#technologyError').html('Required');
		flag=false;
	}else{
		//$('#technologyError').html('');
	}
	if(flag==true){
		$('#displayContent').html('');
		$('#tecloader').html('<img src="images/ajax-loader.gif"/>');
		$.ajax({
			type		:	'GET',
			url			:  	webServiceUrl+'addtechnology/'+courseValue,
			dataType	: 	"json",
			success: function(data){
			$('#tecloader').html('');
				var displayContent="";
				if(data.value==1){
				var obj = eval("(" + data.editCourse + ")");
					$.each(obj, function (index,Object) {
						displayContent='<p><img src="'+Object.technology_image+'" width="300" height="131"><br><br> '+Object.technology_description+'</p>';
					});	
					$('#displayContent').html(displayContent);
				}
			}
		});
	}
	
}
function courseApplying(){
	var flag=true;
	var courseValue=$('#technology_list').val();
	if(courseValue==""){
		$('#technologyError').html('Required');
		flag=false;
	}else{
		$('#technologyError').html('');
	}
	if(flag==true){
		
	}
}
